avatar

No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name springmvc

异常信息

1
2
浏览器 404异常
控制台 No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'

异常原因

1
2
<security:logout logout-url="logout.do" logout-success-url="/login.html" invalidate-session="true"/>
logout-url属性中未加/

解决方法

1
2
1.<mvc:annotation-driven/> 先排除不是注解驱动的问题
2.<security:logout logout-url="/logout.do" logout-success-url="/login.html" invalidate-session="true"/>
文章作者: 123
文章链接: https://gao5805123.github.io/123/2020/05/04/No%20mapping%20found%20for%20HTTP%20request%20with%20URI%20[logout.do]%20in%20DispatcherServlet%20with%20name%20springmvc/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 123
打赏
  • 微信
    微信
  • 支付宝
    支付宝